package com.vcc.service.client.vo.withdraw;


import com.vcc.data.entity.Withdraw;
import com.vcc.service.client.vo.baseVo.BaseVo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.swing.plaf.PanelUI;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


@EqualsAndHashCode(callSuper = true)
@Data
public class WithdrawVo extends BaseVo implements Serializable {

    private Long userId;

    private String account;

    private String orderId;

    private String remark;

    private String type;

    /**
     * 0 成功 1  失败  2  等待中
     */
    private Integer status;

    private Long currencyId;

    private String currencyCode;

    private BigDecimal amount;

    private BigDecimal rate;

    private Date requestDate;

    private Date auditDate;

    private Long auditUserId;

    /**
     * 手续费
     */
    private BigDecimal free;

    /**
     * 汇款币种
     */
    private String remittanceCurrency;

    /**
     * 汇款金额
     */
    private BigDecimal remittanceAmount;

    private String orderHash;

    private String address;

    private String withdrawCurrency;


    public WithdrawVo() {
    }

    public WithdrawVo(Withdraw withdraw,String account){
        super.setId(withdraw.getId());
        super.setCreateDate(withdraw.getCreateDate());
        super.setUpdateDate(withdraw.getUpdateDate());
        this.userId = withdraw.getUserId();
        this.account = account;
        this.orderId = withdraw.getOrderId();
        this.remark = withdraw.getRemark();
        this.type = withdraw.getType();
        this.status = withdraw.getStatus();
        this.currencyId = withdraw.getCurrencyId();
        this.currencyCode = withdraw.getCurrencyCode();
        this.amount = withdraw.getAmount();
        this.rate = withdraw.getRate();
        this.requestDate = withdraw.getRequestDate();
        this.auditDate = withdraw.getAuditDate() != null ? withdraw.getAuditDate() : null;
        this.auditUserId = withdraw.getAuditUserId() != null ? withdraw.getAuditUserId() : 0L;
        this.free = withdraw.getFree();
        this.remittanceCurrency = withdraw.getRemittanceCurrency();
        this.remittanceAmount = withdraw.getRemittanceAmount();
        this.orderHash = withdraw.getOrderHash();
        this.address = withdraw.getAddress();
        this.withdrawCurrency = withdraw.getWithdrawCurrency();
    }

}
